﻿//using System;
//using System.Collections.Generic;
//using System.Linq;
//using System.Security.Cryptography;
//using System.Text;
//using System.Threading.Tasks;

//namespace MVA.Book.Chapter_3._3._2
//{
//    class _23
//    {
//        public static void Main()
//        {
//            UnicodeEncoding byteConverter = new UnicodeEncoding();
//            SHA256 sha256 = SHA256.Create();
//            string data = "A paragraph of text";
//            byte[] hashA = sha256.ComputeHash(byteConverter.GetBytes(data));
//            foreach (byte b in hashA)
//                Console.Write(b.ToString());
//            Console.WriteLine();
//            data = "A paragraph of changed text";
//            byte[] hashB = sha256.ComputeHash(byteConverter.GetBytes(data));
//            data = "A paragraph of text";
//            byte[] hashC = sha256.ComputeHash(byteConverter.GetBytes(data));
//            Console.WriteLine(hashA.SequenceEqual(hashB)); // Displays: false
//            Console.WriteLine(hashA.SequenceEqual(hashC)); // Displays: true
//            Console.ReadKey();
//        }
//    }
//}
